package canss.webservice.model;

import java.io.Serializable;

import canss.supports.basic;

public class ContentsDBContent implements Serializable
{
	private static final long serialVersionUID = 568179581069569792L;
	private String dc_creator = "";
	private String dc_date = "";
	private String dc_description = "";
	private String dc_format = "";
	private String dc_identifier = "";
	private String dc_language = "";
	private String dc_publisher = "";
	private String dc_rights = "";
	private String dc_source = "";
	private String dc_source_type = "";
	private String dc_subject = "";
	private String dc_title = "";
	private String dc_type = "";
	private String xmp_baseURL = "";
	private String xmp_CreateDate = "";
	private String xmp_Identifier = "";
	private String xmp_Rating = "";
	private String canssContent_Thumbnail = "";
	private String xmpDM_duration = "";
	private String xmpDM_copyright = "";
	private String xmpDM_copyright_type = "";
	private String xmpDM_genre = "";
	private String xmpDM_videoFrameSize_w = "";
	private String xmpDM_videoFrameSize_h = "";
	private String xmpDM_ModDate = "";
	private String canssVideo_audioCodecs = "";
	private String canssVideo_videoCodecs = "";
	private String canssVideo_fileSize = "";
	private String canssContentDescription_contentId = "";
	private String canssContentDescription_status = "";
	private String canssContentDescription_views = "";
	private String canssContentDescription_rating = "";
	private String canssContentDescription_owner = "";

	public ContentsDBContent()
	{
		super();
	}

	public ContentsDBContent(String _canssContentDescription_contentId)
	{
		super();
		canssContentDescription_contentId = _canssContentDescription_contentId;
	}

	public String getDC_CREATOR()
	{
		return dc_creator;
	}

	public void setDC_CREATOR(String _dc_creator)
	{
		dc_creator = _dc_creator == null ? "" : _dc_creator.trim();
	}

	public String getDC_DATE()
	{
		return dc_date;
	}

	public void setDC_DATE(String _dc_date)
	{
		dc_date = _dc_date == null ? "" : _dc_date.trim();
	}

	public String getDC_DESCRIPTION()
	{
		return dc_description;
	}

	public void setDC_DESCRIPTION(String _dc_description)
	{
		dc_description = _dc_description == null ? "" : _dc_description.trim();
	}

	public String getDC_FORMAT()
	{
		return dc_format;
	}

	public void setDC_FORMAT(String _dc_format)
	{
		dc_format = _dc_format == null ? "" : _dc_format.trim();
	}

	public String getDC_IDENTIFIER()
	{
		return dc_identifier;
	}

	public void setDC_IDENTIFIER(String _dc_identifier)
	{
		dc_identifier = _dc_identifier == null ? "" : _dc_identifier.trim();
	}

	public String getDC_LANGUAGE()
	{
		return dc_language;
	}

	public void setDC_LANGUAGE(String _dc_language)
	{
		dc_language = _dc_language == null ? "" : _dc_language.trim();
	}

	public String getDC_PUBLISHER()
	{
		return dc_publisher;
	}

	public void setDC_PUBLISHER(String _dc_publisher)
	{
		dc_publisher = _dc_publisher == null ? "" : _dc_publisher.trim();
	}

	public String getDC_RIGHTS()
	{
		return dc_rights;
	}

	public void setDC_RIGHTS(String _dc_rights)
	{
		dc_rights = _dc_rights == null ? "" : _dc_rights.trim();
	}

	public String getDC_SOURCE()
	{
		return dc_source;
	}

	public void setDC_SOURCE(String _dc_source)
	{
		dc_source = _dc_source == null ? "" : _dc_source.trim();
	}

	public String getDC_SOURCE_TYPE()
	{
		return dc_source_type;
	}

	public void setDC_SOURCE_TYPE(String _dc_source_type)
	{
		dc_source_type = _dc_source_type == null ? "" : _dc_source_type.trim();
	}

	public String getDC_SUBJECT()
	{
		return dc_subject;
	}

	public void setDC_SUBJECT(String _dc_subject)
	{
		dc_subject = _dc_subject == null ? "" : _dc_subject.trim();
	}

	public String getDC_TITLE()
	{
		return dc_title;
	}

	public void setDC_TITLE(String _dc_title)
	{
		dc_title = _dc_title == null ? "" : _dc_title.trim();
	}

	public String getDC_TYPE()
	{
		return dc_type;
	}

	public void setDC_TYPE(String _dc_type)
	{
		dc_type = _dc_type == null ? "" : _dc_type.trim();
	}

	public String getXMP_BASEURL()
	{
		return xmp_baseURL;
	}

	public void setXMP_BASEURL(String _xmp_baseURL)
	{
		xmp_baseURL = _xmp_baseURL == null ? "" : _xmp_baseURL.trim();
	}

	public String getXMP_CREATEDATE()
	{
		return xmp_CreateDate;
	}

	public void setXMP_CREATEDATE(String _xmp_CreateDate)
	{
		xmp_CreateDate = _xmp_CreateDate == null ? "" : _xmp_CreateDate.trim();
	}

	public String getXMP_IDENTIFIER()
	{
		return xmp_Identifier;
	}

	public void setXMP_IDENTIFIER(String _xmp_Identifier)
	{
		xmp_Identifier = _xmp_Identifier == null ? "" : _xmp_Identifier.trim();
	}

	public String getXMP_RATING()
	{
		return xmp_Rating;
	}

	public void setXMP_RATING(String _xmp_Rating)
	{
		xmp_Rating = _xmp_Rating == null ? "" : _xmp_Rating.trim();
	}

	public String getCANSSCONTENT_THUMBNAIL()
	{
		return canssContent_Thumbnail;
	}

	public void setCANSSCONTENT_THUMBNAIL(String _canssContent_Thumbnail)
	{
		canssContent_Thumbnail = _canssContent_Thumbnail == null ? "" : _canssContent_Thumbnail.trim();
	}

	public String getXMPDM_DURATION()
	{
		return xmpDM_duration;
	}

	public void setXMPDM_DURATION(String _xmpDM_duration)
	{
		xmpDM_duration = _xmpDM_duration == null ? "" : _xmpDM_duration.trim();
	}

	public String getXMPDM_COPYRIGHT()
	{
		return xmpDM_copyright;
	}

	public void setXMPDM_COPYRIGHT(String _xmpDM_copyright)
	{
		xmpDM_copyright = _xmpDM_copyright == null ? "" : _xmpDM_copyright.trim();
	}

	public String getXMPDM_COPYRIGHT_TYPE()
	{
		return xmpDM_copyright_type;
	}

	public void setXMPDM_COPYRIGHT_TYPE(String _xmpDM_copyright_type)
	{
		xmpDM_copyright_type = _xmpDM_copyright_type == null ? "" : _xmpDM_copyright_type.trim();
	}

	public String getXMPDM_GENRE()
	{
		return xmpDM_genre;
	}

	public void setXMPDM_GENRE(String _xmpDM_genre)
	{
		xmpDM_genre = _xmpDM_genre == null ? "" : _xmpDM_genre.trim();
	}

	public String getXMPDM_VIDEOFRAMESIZE_W()
	{
		return xmpDM_videoFrameSize_w;
	}

	public void setXMPDM_VIDEOFRAMESIZE_W(String _xmpDM_videoFrameSize_w)
	{
		xmpDM_videoFrameSize_w = _xmpDM_videoFrameSize_w == null ? "" : _xmpDM_videoFrameSize_w.trim();
	}

	public String getXMPDM_VIDEOFRAMESIZE_H()
	{
		return xmpDM_videoFrameSize_h;
	}

	public void setXMPDM_VIDEOFRAMESIZE_H(String _xmpDM_videoFrameSize_h)
	{
		xmpDM_videoFrameSize_h = _xmpDM_videoFrameSize_h == null ? "" : _xmpDM_videoFrameSize_h.trim();
	}

	public String getXMPDM_MODDATE()
	{
		return xmpDM_ModDate;
	}

	public void setXMPDM_MODDATE(String _xmpDM_ModDate)
	{
		xmpDM_ModDate = _xmpDM_ModDate == null ? "" : _xmpDM_ModDate.trim();
	}

	public String getCANSSVIDEO_AUDIOCODECS()
	{
		return canssVideo_audioCodecs;
	}

	public void setCANSSVIDEO_AUDIOCODECS(String _canssVideo_audioCodecs)
	{
		canssVideo_audioCodecs = _canssVideo_audioCodecs == null ? "" : _canssVideo_audioCodecs.trim();
	}

	public String getCANSSVIDEO_VIDEOCODECS()
	{
		return canssVideo_videoCodecs;
	}

	public void setCANSSVIDEO_VIDEOCODECS(String _canssVideo_videoCodecs)
	{
		canssVideo_videoCodecs = _canssVideo_videoCodecs == null ? "" : _canssVideo_videoCodecs.trim();
	}

	public String getCANSSVIDEO_FILESIZE()
	{
		return canssVideo_fileSize;
	}

	public void setCANSSVIDEO_FILESIZE(String _canssVideo_fileSize)
	{
		canssVideo_fileSize = _canssVideo_fileSize == null ? "" : _canssVideo_fileSize.trim();
	}

	public String getCANSSCONTENTDESCRIPTION_CONTENTID()
	{
		return canssContentDescription_contentId;
	}

	public void setCANSSCONTENTDESCRIPTION_CONTENTID(String _canssContentDescription_contentId)
	{
		canssContentDescription_contentId = _canssContentDescription_contentId == null ? "" : _canssContentDescription_contentId.trim();
	}

	public String getCANSSCONTENTDESCRIPTION_STATUS()
	{
		return canssContentDescription_status;
	}

	public void setCANSSCONTENTDESCRIPTION_STATUS(String _canssContentDescription_status)
	{
		canssContentDescription_status = _canssContentDescription_status == null ? "" : _canssContentDescription_status.trim();
	}

	public String getCANSSCONTENTDESCRIPTION_VIEWS()
	{
		return canssContentDescription_views;
	}

	public void setCANSSCONTENTDESCRIPTION_VIEWS(String _canssContentDescription_views)
	{
		canssContentDescription_views = _canssContentDescription_views == null ? "" : _canssContentDescription_views.trim();
	}

	public String getCANSSCONTENTDESCRIPTION_RATING()
	{
		return canssContentDescription_rating;
	}

	public void setCANSSCONTENTDESCRIPTION_RATING(String _canssContentDescription_rating)
	{
		canssContentDescription_rating = _canssContentDescription_rating == null ? "" : _canssContentDescription_rating.trim();
	}

	public String getCANSSCONTENTDESCRIPTION_OWNER()
	{
		return canssContentDescription_owner;
	}

	public void setCANSSCONTENTDESCRIPTION_OWNER(String _canssContentDescription_owner)
	{
		canssContentDescription_owner = _canssContentDescription_owner == null ? "" : _canssContentDescription_owner.trim();
	}

	
	/**
	 * default: single xml
	 * @return
	 */
	public static final String toXML(boolean _singlefile, ContentsDBContent[] _list)
	{
		StringBuffer strbuf = new StringBuffer();
		
		if(_singlefile)
			strbuf.append(basic.getXMLStart());
		{
			strbuf.append("<canssContent:mediaGroup>");
			
			if(_list!=null)
			{
				for(ContentsDBContent content : _list)
					if(content!=null)
						strbuf.append(content.toString());
			}
			
			strbuf.append("</canssContent:mediaGroup>");
		}
		if(_singlefile)
			strbuf.append(basic.getXMLEnd());
		
		return strbuf.toString();
	}
	
	public String toString()
	{
		StringBuffer strbuf = new StringBuffer();
		
		strbuf.append("<canssContent:media");
		strbuf.append(" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"");
		strbuf.append(" xmlns:dcterms=\"http://www.purl.org/dc/terms/\"");
		strbuf.append(" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\"");
		strbuf.append(" xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\"");
		strbuf.append(" xmlns:xmpDM=\"http://ns.adobe.com/xmp/1.0/DynamicMedia/\" >");
		strbuf.append("<dc:creator>");
		strbuf.append(""+dc_creator);
		strbuf.append("</dc:creator>");
		strbuf.append("<dc:date>");
		strbuf.append(""+dc_date);
		strbuf.append("</dc:date>");
		strbuf.append("<dc:description>");
		strbuf.append(""+dc_description);
		strbuf.append("</dc:description>");
		strbuf.append("<dc:format>");
		strbuf.append(""+dc_format);
		strbuf.append("</dc:format>");
		strbuf.append("<dc:identifier>");
		strbuf.append(""+dc_identifier);
		strbuf.append("</dc:identifier>");
		strbuf.append("<dc:language>");
		strbuf.append(""+dc_language);
		strbuf.append("</dc:language>");
		strbuf.append("<dc:publisher>");
		strbuf.append(""+dc_publisher);
		strbuf.append("</dc:publisher>");
		strbuf.append("<dc:rights>");
		strbuf.append(""+dc_rights);
		strbuf.append("</dc:rights>");
		strbuf.append("<dc:source dcterms:scheme=\"" + dc_source_type + "\">");
		strbuf.append(""+dc_source);
		strbuf.append("</dc:source>");
		strbuf.append("<dc:subject>");
		strbuf.append(""+dc_subject);
		strbuf.append("</dc:subject>");
		strbuf.append("<dc:title>");
		strbuf.append(""+dc_title);
		strbuf.append("</dc:title>");
		strbuf.append("<dc:type>");
		strbuf.append(""+dc_type);
		strbuf.append("</dc:type>");
		strbuf.append("<xmp:baseURL>");
		strbuf.append(""+xmp_baseURL);
		strbuf.append("</xmp:baseURL>");
		strbuf.append("<xmp:CreateDate>");
		strbuf.append(""+xmp_CreateDate);
		strbuf.append("</xmp:CreateDate>");
		strbuf.append("<xmp:Identifier>");
		strbuf.append(""+xmp_Identifier);
		strbuf.append("</xmp:Identifier>");
		strbuf.append("<xmp:Rating>");
		strbuf.append(""+xmp_Rating);
		strbuf.append("</xmp:Rating>");
		strbuf.append("<xmp:Thumbnails");
		strbuf.append(" xmlns:xmpGImg=\"http://ns.adobe.com/xap/1.0/g/img/\" >");
		if(false)
		{
			strbuf.append("<xmp:Thumbnail>");
			strbuf.append("<xmpGImg:format>");
			strbuf.append("");
			strbuf.append("</xmpGImg:format>");
			strbuf.append("<xmpGImg:width>");
			strbuf.append("");
			strbuf.append("</xmpGImg:width>");
			strbuf.append("<xmpGImg:height>");
			strbuf.append("");
			strbuf.append("</xmpGImg:height>");
			strbuf.append("<xmpGImg:image>");
			strbuf.append("");
			strbuf.append("</xmpGImg:image>");
			strbuf.append("</xmp:Thumbnail>");
		}
		strbuf.append("</xmp:Thumbnails>");
		strbuf.append("<canssContent:Thumbnail>");
		strbuf.append(""+canssContent_Thumbnail);
		strbuf.append("</canssContent:Thumbnail>");
		strbuf.append("<xmpDM:duration>");
		strbuf.append(""+xmpDM_duration);
		strbuf.append("</xmpDM:duration>");
		strbuf.append("<xmpDM:copyright url=\"" + xmpDM_copyright_type + "\">");
		strbuf.append(""+xmpDM_copyright);
		strbuf.append("</xmpDM:copyright>");
		strbuf.append("<xmpDM:genre>");
		strbuf.append(""+xmpDM_genre);
		strbuf.append("</xmpDM:genre>");
		strbuf.append("<xmpDM:markers>");
		if(false)
		{
			strbuf.append("<xmpDM:marker>");
			strbuf.append("<xmpDM:comment>");
			strbuf.append("");
			strbuf.append("</xmpDM:comment>");
			strbuf.append("<xmpDM:name>");
			strbuf.append("");
			strbuf.append("</xmpDM:name>");
			strbuf.append("<xmpDM:startTime>");
			strbuf.append("");
			strbuf.append("</xmpDM:startTime>");
			strbuf.append("<xmpDM:location>");
			strbuf.append("");
			strbuf.append("</xmpDM:location>");
			strbuf.append("</xmpDM:marker>");
		}
		strbuf.append("</xmpDM:markers>");
		strbuf.append("<xmpDM:videoFrameSize");
		strbuf.append(" xmlns:stDim='http://ns.adobe.com/xap/1.0/sType/Dimensions#' >");
		strbuf.append("<stDim:w>");
		strbuf.append(""+xmpDM_videoFrameSize_w);
		strbuf.append("</stDim:w>");
		strbuf.append("<stDim:h>");
		strbuf.append(""+xmpDM_videoFrameSize_h);
		strbuf.append("</stDim:h>");
		strbuf.append("</xmpDM:videoFrameSize>");
		strbuf.append("<xmpDM:ModDate>");
		strbuf.append(""+xmpDM_ModDate);
		strbuf.append("</xmpDM:ModDate>");
		strbuf.append("<canssVideo:audioCodecs>");
		strbuf.append(""+canssVideo_audioCodecs);
		strbuf.append("</canssVideo:audioCodecs>");
		strbuf.append("<canssVideo:videoCodecs>");
		strbuf.append(""+canssVideo_videoCodecs);
		strbuf.append("</canssVideo:videoCodecs>");
		strbuf.append("<canssVideo:fileSize>");
		strbuf.append(""+canssVideo_fileSize);
		strbuf.append("</canssVideo:fileSize>");
		if(false)
		{
			strbuf.append("<canssVideo:credit role='" + "" + "'>");
			strbuf.append("");
			strbuf.append("</canssVideo:credit>");
		}
		if(false)
		{
			strbuf.append("<canssTV:p_startdate>");
			strbuf.append("");
			strbuf.append("</canssTV:p_startdate>");
			strbuf.append("<canssTV:p_enddate>");
			strbuf.append("");
			strbuf.append("</canssTV:p_enddate>");
			strbuf.append("<canssTV:isLive>");
			strbuf.append("");
			strbuf.append("</canssTV:isLive>");
			strbuf.append("<canssTV:isReRun>");
			strbuf.append("");
			strbuf.append("</canssTV:isReRun>");
		}
		strbuf.append("<canssContentDescription:contentId>");
		strbuf.append(""+canssContentDescription_contentId);
		strbuf.append("</canssContentDescription:contentId>");
		strbuf.append("<canssContentDescription:status>");
		strbuf.append(""+canssContentDescription_status);
		strbuf.append("</canssContentDescription:status>");
		strbuf.append("<canssContentDescription:views>");
		strbuf.append(""+canssContentDescription_views);
		strbuf.append("</canssContentDescription:views>");
		strbuf.append("<canssContentDescription:rating>");
		strbuf.append(""+canssContentDescription_rating);
		strbuf.append("</canssContentDescription:rating>");
		strbuf.append("<canssContentDescription:owner>");
		strbuf.append(""+canssContentDescription_owner);
		strbuf.append("</canssContentDescription:owner>");
		if(false)
		{
			strbuf.append("<canssContentDescription:location protocol=\"" + "" + "\">");
			strbuf.append("");
			strbuf.append("</canssContentDescription:location>");
		}
		if(false)
		{
			strbuf.append("<canssContentDescription:price currencyCode='" + "" + "'>");
			strbuf.append("");
			strbuf.append("</canssContentDescription:price>");
			strbuf.append("<canssContentDescription:valid name='" + "" +
					      "' start='" + "" +
					      "' end='" + "" + 
					      "' />");
		}
		strbuf.append("</canssContent:media>");
		
		return strbuf.toString();
	}
}
